<?php
if (isset($_SESSION['rang']) != 1)
    header('Location:index.php');
else {
//Affectation des variables
    $login = VariablesGlobales::$unUser->login;
    $password = VariablesGlobales::$unUser->password;
    $rang = VariablesGlobales::$unUser->rang;
    ?>

    <form action="index.php?controleur=User&action=modifier&id=<?php echo $id ?>" method="POST" class="col-lg-6">
        <table class="table table-bordered">
            <h2>Modification de l'utilisateur</h2>
            <tr class="alert-info">
                <td>Login</td>
                <td>Passe</td>
                <td>Rang</td>
            </tr>
            <tr>
                <td><input type="text" name="login" value="<?php echo $login ?>" /></td>
                <td><input type="text" name="password" value="<?php echo $password ?>" /></td>
                <td><input type="text" name="rang" value="<?php echo $rang ?>" /></td>
            </tr>

        </table>
        <center><input type="submit" name="valider" value="Modifier" class="btn btn-success"/></center>
    </form>
    <?php
}
    